package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);
    /*
    * 查询历史订单
    * */
    PageResult page(Integer page, Integer pageSize, Integer status);

    OrderVO getOrderDetail(Long id);

    void cancel(Long id) throws Exception;

    void repetition(Long id);
    /*
    * 订单搜索
    * */
    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);
    /*
    * 各个状态订单的数量统计
    * */
    OrderStatisticsVO countOrderStatus();

    void confirmOrder(OrdersConfirmDTO ordersConfirmDTO);

    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    void cancelByUser(OrdersCancelDTO ordersCancelDTO) throws Exception;

    void delivery(Long id);

    void complete(Long id);
}
